<?php
/**
 * Created by PhpStorm.
 * User: gyccvvh
 * Date: 2018-07-05
 * Time: 15:27
 */

namespace app\merchant\validate;


use think\Validate;

class Goods extends Validate{
    protected $rule = [
        'name|商品名称' => 'require',
        'keyword|关键字'   =>  'require',
        'origcost|成本价'  => 'require|number',
        'price|售价'      => 'require|number',
        'express_id|快递规则'   => 'require'
    ];

    protected $message = [
        "name.require"  => "商品名称不能为空",
        "keyword.require"   => "关键字不能为空",
        "origcost.require"  => "成本价不能为空",
        "origcost.number"   => "价格格式错误",
        "price.require"     => "售价不能为空",
        "price.number"      => "价格格式错误",
        "express_id.require"    => "快递规则不能为空"
    ];
}